/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-06-22 18:24:11
 * @LastEditTime: 2024-06-22 18:57:28
 * @FilePath: /nest_study/web/src/api/login/index.ts
 */
import { http } from "@/utils/request";
import { TLogin } from "./login.type";
import { TResponse } from "../index.type";

//登录
export const login = (data: TLogin) => {
    return http.post<TResponse>(`/api/login`, data);
}

//获取登录用户权限
export const remoteUserAuth = () => {
    return http.get<TResponse>(`/api/system/role/auth`);
}

//退出登录
export const logout = () => {
    return http.post<TResponse>(`/api/logout`);
}
